Fix OpenCode Go Usage Dashboard link to open workspace-specific URL#667
Fix OpenCode Go Usage Dashboard link to open workspace-specific URL#667RizaSatya wants to merge 2 commits intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f96b91963a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var opencodegoDashboardURL: URL? { | ||
| let workspaceID = self.opencodegoWorkspaceID | ||
| if !workspaceID.isEmpty { | ||
| return URL(string: "https://opencode.ai/workspace/\(workspaceID)/go") |
There was a problem hiding this comment.
Normalize workspace setting before building dashboard URL
Constructing the dashboard link with raw opencodegoWorkspaceID breaks when users paste a full workspace URL instead of just wrk_... (a format we already tolerate in OpenCodeGoUsageFetcher tests, e.g. URL-to-ID normalization). In that case this code produces https://opencode.ai/workspace/https://opencode.ai/workspace/.../go, so the “Usage Dashboard” action opens an invalid workspace path rather than the intended dashboard.
Useful? React with 👍 / 👎.
Summary
Problem: When clicking "Usage Dashboard" for OpenCode Go, the app always opens
https://opencode.ai/instead of the workspace-specific usage page athttps://opencode.ai/workspace/{workspace_id}/go.Fix: Added a computed property
opencodegoDashboardURLinOpenCodeGoSettingsStore.swiftthat constructs the correct workspace-specific URL when aworkspaceIDis configured. UpdatedStatusItemController+Actions.swiftto use this URL for the OpenCode Go provider.Files changed:
Sources/CodexBar/Providers/OpenCodeGo/OpenCodeGoSettingsStore.swift- AddedopencodegoDashboardURLpropertySources/CodexBar/StatusItemController+Actions.swift- Added special handling for.opencodegoindashboardURL(for:)